package work.parabola.assets.common;

/**
 * 
 * @author 黄松祥
 * 2018年7月26日 下午4:21:33
 */
public class CounterConst {
	
	public static final String SEARCH_WHOLE_ORG = "0";
	
	public static final Integer UNINIT_PAYMENT = 0;
	
	public static final Integer INITED_PAYMENT = 1;
	
	public enum TradeTypeEnum{
		INIT(0, "设置初始金额"),
		INCOME(1, "收入"),
		EXPEND(2, "支出");
		private int code;
		
		private String value;
		
		private TradeTypeEnum(int code, String value) {
			this.code = code;
			this.value = value;
		}
		public int getCode() {
			return code;
		}

		public String getValue() {
			return value;
		}
		public static TradeTypeEnum codeOf(int code){
            for(TradeTypeEnum tradeTypeEnum : values()){
                if(tradeTypeEnum.getCode() == code){
                    return tradeTypeEnum;
                }
            }
            return null;
        }
	}
	
	public enum TypeEnum{
		PERSON(0, "个人征信"),
		FIRM(1, "企业征信");
		private int code;
		
		private String value;
		
		private TypeEnum(int code, String value){
			this.code = code;
			this.value = value;
		}
		public int getCode() {
			return code;
		}

		public String getValue() {
			return value;
		}
		public static TypeEnum codeOf(int code){
            for(TypeEnum typeEnum : values()){
                if(typeEnum.getCode() == code){
                    return typeEnum;
                }
            }
            return null;
        }
		public static TypeEnum searchByValue(String value){
			for(TypeEnum typeEnum : values()){
				if(typeEnum.getValue().equals(value)){
					return typeEnum;
				}
			}
			return null;
		}
	}

	public enum QueryTypeEnum{
		COUNTER(0, "柜台"),
		MACHINE(1, "自助查询机");
		private int code;
		
		private String value;
		
		private QueryTypeEnum(int code, String value){
			this.code = code;
			this.value = value;
		}
		public int getCode() {
			return code;
		}

		public String getValue() {
			return value;
		}
		public static QueryTypeEnum codeOf(int code){
            for(QueryTypeEnum queryTypeEnum : values()){
                if(queryTypeEnum.getCode() == code){
                    return queryTypeEnum;
                }
            }
            return null;
        }
		public static QueryTypeEnum searchByValue(String value){
			for(QueryTypeEnum queryTypeEnum : values()){
				if(queryTypeEnum.getValue().equals(value)){
					return queryTypeEnum;
				}
			}
			return null;
		}
	}
	
	public enum JudiciaryQueryEnum{
		NONJUDICIARY(0, "不是司法查询"),
		JUDICIARY(1, "司法查询");
		private int code;
		
		private String value;
		
		private JudiciaryQueryEnum(int code, String value){
			this.code = code;
			this.value = value;
		}
		public int getCode() {
			return code;
		}

		public String getValue() {
			return value;
		}
		public static JudiciaryQueryEnum codeOf(int code){
            for(JudiciaryQueryEnum judiciaryQueryEnum : values()){
                if(judiciaryQueryEnum.getCode() == code){
                    return judiciaryQueryEnum;
                }
            }
            return null;
        }
		public static JudiciaryQueryEnum searchByValue(String value){
			for(JudiciaryQueryEnum judiciaryQueryEnum : values()){
				if(judiciaryQueryEnum.getValue().equals(value)){
					return judiciaryQueryEnum;
				}
			}
			return null;
		}
	}
	
	public enum AcceptBankTypeEnum {
		PROVINCE(0, "省级"),
		SUB_PROVINCE(1, "副省级"),
		CITY(2, "地市级"),
		DISTRICT(3, "县级");
		private int code;
		
		private String value;
		
		private AcceptBankTypeEnum(int code, String value){
			this.code = code;
			this.value = value;
		}
		public int getCode() {
			return code;
		}

		public String getValue() {
			return value;
		}
		
		public static AcceptBankTypeEnum codeOf(int code){
            for(AcceptBankTypeEnum acceptBankTypeEnum : values()){
                if(acceptBankTypeEnum.getCode() == code){
                    return acceptBankTypeEnum;
                }
            }
            return null;
        }
		public static AcceptBankTypeEnum searchByValue(String value){
			for(AcceptBankTypeEnum acceptBankTypeEnum : values()){
				if(acceptBankTypeEnum.getValue().equals(value)){
					return acceptBankTypeEnum;
				}
			}
			return null;
		}
	}
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
}
